package com.ziven.common.widget.value;

import android.view.View;

import androidx.annotation.NonNull;

import com.ziven.easygo.util.ViewHelper;

/**
 * @author Ziven
 */
public final class ViewId extends Value {

    public static ViewId id(int id) {
        return new ViewId(id);
    }

    private ViewId(int id) {
        value(id);
    }

    @Override
    protected void takeEffect(@NonNull ViewHelper<? extends View> helper) {
        helper.getViewNulls().doNotNull(view -> value(Integer.class, view::setId));
    }
}
